export type ZhiwuStatusType = "" | "faya" | "shengzhang" | "kaihua" | "chengshu"

// 植物的状态
export enum ZhiwuStatus {
    Kong = "",
    FAYA = "faya",
    SHENGZHANG = "shengzhang",
    KAIHUA = "kaihua",
    CHENGSHU = "chengshu",
}

// 种子的类型
export interface SeedType {
    type: "seed" // 类型是种子
    price: number  // 种子的价格
    name: string  // 种子的名称
    description: string  // 种子的描述
    level: number  // 种子等级
    chance: number  // 掉落概率
    amount: 1   // 掉落数量
}
// 产品的类型
export interface ProductDataType {
    type: "product"  // 类型是产品
    name: string  // 产品名称
    description: string  // 产品描述
    price: number  // 产品基础价格
    level: number  // 产品等级
    isCaoYao: boolean  // 是否是药材
    isFuZhen: boolean // 是否是符箓的材料
    isEquip: boolean // 是否是装备材料
    amount: number  // 生成的数量
}
// 植物的类型
export interface ZhiwuDataType {
    type: "zhiwu"  // 类型是植物
    name: string  // 植物名称
    description: string  // 植物描述
    level: number  // 植物等级
    seed: SeedType  // 植物对应的种子
    product: ProductDataType[]  // 植物对应的产品
    status: ZhiwuStatusType,    // 植物状态
    // 成长时间
    growTime: {
        faya: number,    // 发芽时间
        shengzhang: number,  // 生长时间
        kaihua: number,  // 开花时间
        chengshu: number,   // 成熟时间
    }
    exp: {
        zhongzhi: number,  // 种植经验
        shouhua: number,  // 收获经验
    },
    starUpgradeChance:number    // 升星概率
    starDowngradeChance:number  // 降星概率
}

/*
* 1级的植物，生长时间不能超过2分钟，10级植物不能超过1天
* 1级植物的经验不超过30，10级植物的经验不超过1000
* 产品的价格比种子至少高10%
* 1级种子的价格不能超过30，10级种子的价格不能超过1000
* 降星概率要非常的低
* 升星概率最高不超过10%
* 植物的产物不能少于1种，不能超过5种
* */


export const zhiwuList: ZhiwuDataType[] =  [
    {
        type: "zhiwu",
        name: "青灵草",
        description: "常见的低级灵草，叶片泛着淡淡的青光",
        level: 1,
        seed: {
            type: "seed",
            price: 15,
            name: "青灵草种子",
            description: "可以种植出青灵草的种子",
            level: 1,
            chance: 0.3,
            amount: 1
        },
        product: [
            {
                type: "product",
                name: "青灵草叶",
                description: "青灵草的叶片，可用于制作低级丹药",
                price: 18,
                level: 1,
                isCaoYao: true,
                isFuZhen: false,
                isEquip: false,
                amount: 2
            }
        ],
        status: "",
        growTime: {
            faya: 10,    // 10秒
            shengzhang: 30,  // 30秒
            kaihua: 20,  // 20秒
            chengshu: 30    // 30秒
        },
        exp: {
            zhongzhi: 10,
            shouhua: 15
        },
        starUpgradeChance: 0.05,
        starDowngradeChance: 0.01
    },
    {
        type: "zhiwu",
        name: "符纸竹",
        description: "茎干细长，适合制作初级符纸",
        level: 1,
        seed: {
            type: "seed",
            price: 20,
            name: "符纸竹种子",
            description: "可以种植出符纸竹的种子",
            level: 1,
            chance: 0.25,
            amount: 1
        },
        product: [
            {
                type: "product",
                name: "初级符纸",
                description: "制作符箓的基础材料",
                price: 25,
                level: 1,
                isCaoYao: false,
                isFuZhen: true,
                isEquip: false,
                amount: 3
            }
        ],
        status: "",
        growTime: {
            faya: 15,
            shengzhang: 40,
            kaihua: 25,
            chengshu: 40
        },
        exp: {
            zhongzhi: 12,
            shouhua: 18
        },
        starUpgradeChance: 0.06,
        starDowngradeChance: 0.01
    },
    {
        type: "zhiwu",
        name: "铁皮藤",
        description: "茎干坚硬如铁，可用于制作低级护具",
        level: 1,
        seed: {
            type: "seed",
            price: 25,
            name: "铁皮藤种子",
            description: "可以种植出铁皮藤的种子",
            level: 1,
            chance: 0.2,
            amount: 1
        },
        product: [
            {
                type: "product",
                name: "铁皮藤条",
                description: "坚韧的藤条，可用于制作护甲",
                price: 30,
                level: 1,
                isCaoYao: false,
                isFuZhen: false,
                isEquip: true,
                amount: 1
            }
        ],
        status: "",
        growTime: {
            faya: 20,
            shengzhang: 50,
            kaihua: 30,
            chengshu: 50
        },
        exp: {
            zhongzhi: 15,
            shouhua: 20
        },
        starUpgradeChance: 0.07,
        starDowngradeChance: 0.01
    },
    {
        type: "zhiwu",
        name: "宁神花",
        description: "散发淡淡香气，有安神效果的花朵",
        level: 1,
        seed: {
            type: "seed",
            price: 18,
            name: "宁神花种子",
            description: "可以种植出宁神花的种子",
            level: 1,
            chance: 0.28,
            amount: 1
        },
        product: [
            {
                type: "product",
                name: "宁神花瓣",
                description: "可用于制作安神丹药",
                price: 22,
                level: 1,
                isCaoYao: true,
                isFuZhen: false,
                isEquip: false,
                amount: 3
            },
            {
                type: "product",
                name: "宁神花蜜",
                description: "香甜的花蜜，可食用",
                price: 25,
                level: 1,
                isCaoYao: false,
                isFuZhen: false,
                isEquip: false,
                amount: 1
            }
        ],
        status: "",
        growTime: {
            faya: 12,
            shengzhang: 35,
            kaihua: 25,
            chengshu: 35
        },
        exp: {
            zhongzhi: 12,
            shouhua: 18
        },
        starUpgradeChance: 0.06,
        starDowngradeChance: 0.01
    },
    {
        type: "zhiwu",
        name: "灵纹木",
        description: "树干上有天然纹路的灵木，适合制作符笔",
        level: 1,
        seed: {
            type: "seed",
            price: 22,
            name: "灵纹木种子",
            description: "可以种植出灵纹木的种子",
            level: 1,
            chance: 0.22,
            amount: 1
        },
        product: [
            {
                type: "product",
                name: "灵纹木枝",
                description: "带有灵纹的树枝，制作符笔的材料",
                price: 28,
                level: 1,
                isCaoYao: false,
                isFuZhen: true,
                isEquip: false,
                amount: 2
            },
            {
                type: "product",
                name: "灵纹木屑",
                description: "制作香料的材料",
                price: 15,
                level: 1,
                isCaoYao: false,
                isFuZhen: false,
                isEquip: false,
                amount: 5
            }
        ],
        status: "",
        growTime: {
            faya: 18,
            shengzhang: 45,
            kaihua: 30,
            chengshu: 45
        },
        exp: {
            zhongzhi: 14,
            shouhua: 20
        },
        starUpgradeChance: 0.07,
        starDowngradeChance: 0.01
    },
    {
        type: "zhiwu",
        name: "铜皮果",
        description: "果实表皮坚硬如铜，果肉可入药",
        level: 1,
        seed: {
            type: "seed",
            price: 20,
            name: "铜皮果种子",
            description: "可以种植出铜皮果的种子",
            level: 1,
            chance: 0.25,
            amount: 1
        },
        product: [
            {
                type: "product",
                name: "铜皮果",
                description: "果肉可制作疗伤药",
                price: 25,
                level: 1,
                isCaoYao: true,
                isFuZhen: false,
                isEquip: false,
                amount: 2
            },
            {
                type: "product",
                name: "铜果壳",
                description: "坚硬的果壳，可用于制作小型护具",
                price: 18,
                level: 1,
                isCaoYao: false,
                isFuZhen: false,
                isEquip: true,
                amount: 3
            }
        ],
        status: "",
        growTime: {
            faya: 15,
            shengzhang: 40,
            kaihua: 30,
            chengshu: 40
        },
        exp: {
            zhongzhi: 15,
            shouhua: 22
        },
        starUpgradeChance: 0.08,
        starDowngradeChance: 0.01
    },
    {
        type: "zhiwu",
        name: "灵光草",
        description: "夜晚会发出微弱光芒的灵草",
        level: 1,
        seed: {
            type: "seed",
            price: 28,
            name: "灵光草种子",
            description: "可以种植出灵光草的种子",
            level: 1,
            chance: 0.18,
            amount: 1
        },
        product: [
            {
                type: "product",
                name: "灵光草叶",
                description: "可用于制作夜视丹药",
                price: 35,
                level: 1,
                isCaoYao: true,
                isFuZhen: false,
                isEquip: false,
                amount: 2
            },
            {
                type: "product",
                name: "灵光粉",
                description: "发光粉末，可用于制作特殊符箓",
                price: 30,
                level: 1,
                isCaoYao: false,
                isFuZhen: true,
                isEquip: false,
                amount: 3
            }
        ],
        status: "",
        growTime: {
            faya: 20,
            shengzhang: 50,
            kaihua: 35,
            chengshu: 50
        },
        exp: {
            zhongzhi: 18,
            shouhua: 25
        },
        starUpgradeChance: 0.08,
        starDowngradeChance: 0.01
    },
    {
        type: "zhiwu",
        name: "韧皮树",
        description: "树皮极为坚韧，可用于制作护甲",
        level: 1,
        seed: {
            type: "seed",
            price: 30,
            name: "韧皮树种子",
            description: "可以种植出韧皮树的种子",
            level: 1,
            chance: 0.15,
            amount: 1
        },
        product: [
            {
                type: "product",
                name: "韧树皮",
                description: "坚韧的树皮，制作护甲的上好材料",
                price: 38,
                level: 1,
                isCaoYao: false,
                isFuZhen: false,
                isEquip: true,
                amount: 1
            },
            {
                type: "product",
                name: "韧木条",
                description: "可用于制作弓弦",
                price: 25,
                level: 1,
                isCaoYao: false,
                isFuZhen: false,
                isEquip: true,
                amount: 3
            }
        ],
        status: "",
        growTime: {
            faya: 25,
            shengzhang: 60,
            kaihua: 40,
            chengshu: 60
        },
        exp: {
            zhongzhi: 20,
            shouhua: 30
        },
        starUpgradeChance: 0.1,
        starDowngradeChance: 0.01
    },
    {
        type: "zhiwu",
        name: "清心莲",
        description: "生长在灵池中的莲花，有清心明目的功效",
        level: 1,
        seed: {
            type: "seed",
            price: 25,
            name: "清心莲种子",
            description: "可以种植出清心莲的种子",
            level: 1,
            chance: 0.2,
            amount: 1
        },
        product: [
            {
                type: "product",
                name: "清心莲子",
                description: "可制作解毒丹药",
                price: 32,
                level: 1,
                isCaoYao: true,
                isFuZhen: false,
                isEquip: false,
                amount: 2
            },
            {
                type: "product",
                name: "莲叶",
                description: "可用于制作防水材料",
                price: 20,
                level: 1,
                isCaoYao: false,
                isFuZhen: false,
                isEquip: true,
                amount: 3
            },
            {
                type: "product",
                name: "莲花",
                description: "美丽的莲花，可用于装饰",
                price: 28,
                level: 1,
                isCaoYao: false,
                isFuZhen: false,
                isEquip: false,
                amount: 1
            }
        ],
        status: "",
        growTime: {
            faya: 15,
            shengzhang: 45,
            kaihua: 35,
            chengshu: 45
        },
        exp: {
            zhongzhi: 18,
            shouhua: 25
        },
        starUpgradeChance: 0.09,
        starDowngradeChance: 0.01
    },
    {
        type: "zhiwu",
        name: "火灵椒",
        description: "蕴含微弱火灵力的辣椒",
        level: 1,
        seed: {
            type: "seed",
            price: 22,
            name: "火灵椒种子",
            description: "可以种植出火灵椒的种子",
            level: 1,
            chance: 0.23,
            amount: 1
        },
        product: [
            {
                type: "product",
                name: "火灵椒",
                description: "可用于制作火属性丹药",
                price: 28,
                level: 1,
                isCaoYao: true,
                isFuZhen: false,
                isEquip: false,
                amount: 4
            },
            {
                type: "product",
                name: "火灵粉",
                description: "辣椒粉，可用于制作火属性符箓",
                price: 25,
                level: 1,
                isCaoYao: false,
                isFuZhen: true,
                isEquip: false,
                amount: 3
            }
        ],
        status: "",
        growTime: {
            faya: 12,
            shengzhang: 35,
            kaihua: 25,
            chengshu: 35
        },
        exp: {
            zhongzhi: 15,
            shouhua: 20
        },
        starUpgradeChance: 0.07,
        starDowngradeChance: 0.01
    },
    {
        type: "zhiwu",
        name: "银月草",
        description: "叶片如弯月，夜晚会吸收月光精华",
        level: 2,
        seed: {
            type: "seed",
            price: 45,
            name: "银月草种子",
            description: "需要在月光下种植的特殊种子",
            level: 2,
            chance: 0.25,
            amount: 1
        },
        product: [
            {
                type: "product",
                name: "月华露",
                description: "蕴含月之精华的露珠，可炼制月华丹",
                price: 60,
                level: 2,
                isCaoYao: true,
                isFuZhen: false,
                isEquip: false,
                amount: 2
            }
        ],
        status: "",
        growTime: {
            faya: 30,
            shengzhang: 90,
            kaihua: 60,
            chengshu: 90
        },
        exp: {
            zhongzhi: 25,
            shouhua: 35
        },
        starUpgradeChance: 0.06,
        starDowngradeChance: 0.01
    },
    {
        type: "zhiwu",
        name: "雷击木",
        description: "曾被天雷劈中而不死的灵木，蕴含雷属性",
        level: 2,
        seed: {
            type: "seed",
            price: 60,
            name: "雷击木种子",
            description: "表面有闪电纹路的奇特种子",
            level: 2,
            chance: 0.18,
            amount: 1
        },
        product: [
            {
                type: "product",
                name: "雷纹木",
                description: "制作雷属性符箓的上好材料",
                price: 80,
                level: 2,
                isCaoYao: false,
                isFuZhen: true,
                isEquip: false,
                amount: 1
            },
            {
                type: "product",
                name: "雷灵屑",
                description: "蕴含微弱雷灵力的木屑",
                price: 50,
                level: 2,
                isCaoYao: true,
                isFuZhen: false,
                isEquip: false,
                amount: 3
            }
        ],
        status: "",
        growTime: {
            faya: 40,
            shengzhang: 120,
            kaihua: 80,
            chengshu: 120
        },
        exp: {
            zhongzhi: 35,
            shouhua: 45
        },
        starUpgradeChance: 0.08,
        starDowngradeChance: 0.01
    },
    {
        type: "zhiwu",
        name: "玄铁藤",
        description: "藤蔓坚硬如铁，是制作武器的好材料",
        level: 2,
        seed: {
            type: "seed",
            price: 55,
            name: "玄铁藤种子",
            description: "沉甸甸的黑色种子",
            level: 2,
            chance: 0.2,
            amount: 1
        },
        product: [
            {
                type: "product",
                name: "玄铁藤芯",
                description: "藤蔓最坚韧的部分，可制作软鞭",
                price: 75,
                level: 2,
                isCaoYao: false,
                isFuZhen: false,
                isEquip: true,
                amount: 1
            },
            {
                type: "product",
                name: "玄铁叶",
                description: "锋利的叶片，可制作暗器",
                price: 60,
                level: 2,
                isCaoYao: false,
                isFuZhen: false,
                isEquip: true,
                amount: 5
            }
        ],
        status: "",
        growTime: {
            faya: 35,
            shengzhang: 110,
            kaihua: 70,
            chengshu: 110
        },
        exp: {
            zhongzhi: 30,
            shouhua: 40
        },
        starUpgradeChance: 0.07,
        starDowngradeChance: 0.01
    },
    {
        type: "zhiwu",
        name: "冰晶花",
        description: "生长在寒冷环境的花朵，花瓣如冰晶般透明",
        level: 2,
        seed: {
            type: "seed",
            price: 50,
            name: "冰晶花种子",
            description: "摸起来冰凉的特殊种子",
            level: 2,
            chance: 0.22,
            amount: 1
        },
        product: [
            {
                type: "product",
                name: "冰晶花瓣",
                description: "可用于制作冰属性丹药",
                price: 70,
                level: 2,
                isCaoYao: true,
                isFuZhen: false,
                isEquip: false,
                amount: 3
            },
            {
                type: "product",
                name: "冰晶粉",
                description: "制作冰属性符箓的材料",
                price: 65,
                level: 2,
                isCaoYao: false,
                isFuZhen: true,
                isEquip: false,
                amount: 2
            }
        ],
        status: "",
        growTime: {
            faya: 30,
            shengzhang: 100,
            kaihua: 60,
            chengshu: 100
        },
        exp: {
            zhongzhi: 28,
            shouhua: 38
        },
        starUpgradeChance: 0.07,
        starDowngradeChance: 0.01
    },
    {
        type: "zhiwu",
        name: "金丝楠",
        description: "木质坚硬，纹理如金丝般华丽",
        level: 2,
        seed: {
            type: "seed",
            price: 70,
            name: "金丝楠种子",
            description: "表面有金色纹路的珍贵种子",
            level: 2,
            chance: 0.15,
            amount: 1
        },
        product: [
            {
                type: "product",
                name: "金丝楠木",
                description: "制作高级家具和法器的材料",
                price: 95,
                level: 2,
                isCaoYao: false,
                isFuZhen: false,
                isEquip: true,
                amount: 1
            },
            {
                type: "product",
                name: "金丝楠叶",
                description: "可用于制作护身符",
                price: 60,
                level: 2,
                isCaoYao: false,
                isFuZhen: true,
                isEquip: false,
                amount: 5
            }
        ],
        status: "",
        growTime: {
            faya: 45,
            shengzhang: 140,
            kaihua: 90,
            chengshu: 140
        },
        exp: {
            zhongzhi: 40,
            shouhua: 50
        },
        starUpgradeChance: 0.1,
        starDowngradeChance: 0.01
    },
    {
        type: "zhiwu",
        name: "血灵芝",
        description: "通体血红的灵芝，蕴含强大生命力",
        level: 2,
        seed: {
            type: "seed",
            price: 65,
            name: "血灵芝孢子",
            description: "需要以灵兽血液浇灌的特殊孢子",
            level: 2,
            chance: 0.17,
            amount: 1
        },
        product: [
            {
                type: "product",
                name: "血灵芝",
                description: "炼制续命丹的主要材料",
                price: 90,
                level: 2,
                isCaoYao: true,
                isFuZhen: false,
                isEquip: false,
                amount: 1
            },
            {
                type: "product",
                name: "灵芝粉",
                description: "强效的疗伤药材料",
                price: 70,
                level: 2,
                isCaoYao: true,
                isFuZhen: false,
                isEquip: false,
                amount: 3
            }
        ],
        status: "",
        growTime: {
            faya: 50,
            shengzhang: 150,
            kaihua: 100,
            chengshu: 150
        },
        exp: {
            zhongzhi: 45,
            shouhua: 55
        },
        starUpgradeChance: 0.09,
        starDowngradeChance: 0.01
    },
    {
        type: "zhiwu",
        name: "风语竹",
        description: "风吹过时会发出悦耳声响的灵竹",
        level: 2,
        seed: {
            type: "seed",
            price: 48,
            name: "风语竹笋",
            description: "蕴含风灵力的竹笋",
            level: 2,
            chance: 0.23,
            amount: 1
        },
        product: [
            {
                type: "product",
                name: "风语竹筒",
                description: "制作风属性法器的材料",
                price: 65,
                level: 2,
                isCaoYao: false,
                isFuZhen: false,
                isEquip: true,
                amount: 2
            },
            {
                type: "product",
                name: "风灵叶",
                description: "可用于制作轻身符",
                price: 55,
                level: 2,
                isCaoYao: false,
                isFuZhen: true,
                isEquip: false,
                amount: 4
            }
        ],
        status: "",
        growTime: {
            faya: 30,
            shengzhang: 95,
            kaihua: 65,
            chengshu: 95
        },
        exp: {
            zhongzhi: 27,
            shouhua: 37
        },
        starUpgradeChance: 0.07,
        starDowngradeChance: 0.01
    },
    {
        type: "zhiwu",
        name: "地心灵参",
        description: "吸收地脉灵气生长的灵参",
        level: 2,
        seed: {
            type: "seed",
            price: 75,
            name: "地心灵参种子",
            description: "需要种植在灵脉附近的珍贵种子",
            level: 2,
            chance: 0.12,
            amount: 1
        },
        product: [
            {
                type: "product",
                name: "地心灵参",
                description: "可大幅提升修为的珍贵药材",
                price: 110,
                level: 2,
                isCaoYao: true,
                isFuZhen: false,
                isEquip: false,
                amount: 1
            },
            {
                type: "product",
                name: "参须",
                description: "具有固本培元的效果",
                price: 80,
                level: 2,
                isCaoYao: true,
                isFuZhen: false,
                isEquip: false,
                amount: 3
            }
        ],
        status: "",
        growTime: {
            faya: 60,
            shengzhang: 180,
            kaihua: 120,
            chengshu: 180
        },
        exp: {
            zhongzhi: 50,
            shouhua: 60
        },
        starUpgradeChance: 0.1,
        starDowngradeChance: 0.01
    },
    {
        type: "zhiwu",
        name: "幻心草",
        description: "能让人产生轻微幻觉的奇特灵草",
        level: 2,
        seed: {
            type: "seed",
            price: 52,
            name: "幻心草种子",
            description: "种子表面有迷幻的花纹",
            level: 2,
            chance: 0.2,
            amount: 1
        },
        product: [
            {
                type: "product",
                name: "幻心草叶",
                description: "制作迷幻丹的材料",
                price: 72,
                level: 2,
                isCaoYao: true,
                isFuZhen: false,
                isEquip: false,
                amount: 3
            },
            {
                type: "product",
                name: "幻尘",
                description: "制作幻术符箓的材料",
                price: 65,
                level: 2,
                isCaoYao: false,
                isFuZhen: true,
                isEquip: false,
                amount: 2
            },
            {
                type: "product",
                name: "幻心花",
                description: "美丽但危险的花朵",
                price: 85,
                level: 2,
                isCaoYao: false,
                isFuZhen: false,
                isEquip: false,
                amount: 1
            }
        ],
        status: "",
        growTime: {
            faya: 35,
            shengzhang: 105,
            kaihua: 70,
            chengshu: 105
        },
        exp: {
            zhongzhi: 32,
            shouhua: 42
        },
        starUpgradeChance: 0.08,
        starDowngradeChance: 0.01
    },
    {
        type: "zhiwu",
        name: "星辉藤",
        description: "夜晚会发出星光的奇特藤蔓",
        level: 2,
        seed: {
            type: "seed",
            price: 58,
            name: "星辉藤种子",
            description: "种子表面有星光斑点",
            level: 2,
            chance: 0.18,
            amount: 1
        },
        product: [
            {
                type: "product",
                name: "星辉丝",
                description: "制作星属性法衣的材料",
                price: 78,
                level: 2,
                isCaoYao: false,
                isFuZhen: false,
                isEquip: true,
                amount: 2
            },
            {
                type: "product",
                name: "星光粉",
                description: "制作占星符的材料",
                price: 68,
                level: 2,
                isCaoYao: false,
                isFuZhen: true,
                isEquip: false,
                amount: 3
            }
        ],
        status: "",
        growTime: {
            faya: 40,
            shengzhang: 115,
            kaihua: 75,
            chengshu: 115
        },
        exp: {
            zhongzhi: 35,
            shouhua: 45
        },
        starUpgradeChance: 0.08,
        starDowngradeChance: 0.01
    }
];